package com.creditease.cn.monitor.controller;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.creditease.cn.monitor.service.MonitorService;

@Controller
@RequestMapping("/monitor")
public class MonitorController extends BaseController{

	@Autowired
	private MonitorService monitorService;
	
	@RequestMapping("/toMemoryMonitor")
	public String toMemoryMonitor(){
		return "/monitor/memoryMonitor.html";
	}
	
	@RequestMapping("/getMemory")
	public void getMemory(HttpServletResponse response){
		String usedMemory = monitorService.getUsedMemory();
		ajaxSendStr(usedMemory+"", response);
	}
}
